<?php echo form_open(base_url() . 'admin/order/file_xls?id='.$ID);?>
<?php
$i=0;
echo "<table align='left' width='60%' border='1' cellspacing='0' cellpadding='1' bordercolor='#FF99FF' style='margin-left :20px; margin-top :20px'>";
echo "<tr background-color='red'>";
echo "<td  style='padding:5px' colspan='3' bgcolor='#FF5CAD' align='center'   > <strong> ";  echo "Danh sách đặt cơm ngày: ";  echo $day;     echo "</strong></td>";  
echo "<tr background-color='red'>";
echo "<td bgcolor='pink' align='center'   > <strong> ";  echo "Mã hồ sơ";     echo "</strong></td>";
echo "<td bgcolor='pink' align='center'   > <strong>  ";  echo "Họ và tên"; echo "</td>";
echo "<td bgcolor='pink' align='center'   > <strong>  ";    echo "Số điện thoại";   echo "</td>";
echo "</tr>";
if(isset($query)){
    foreach($query as $row){    
        $i++;
        echo "<tr >";
        echo "<td bgcolor='yellow' align='center'> <strong> ".$row->MaHoSo."</strong></td>";
        echo "<td style='padding-left: 15px'><a href='".base_url('admin/home/getDetail?staffId=').$row->MaHoSo."' style= 'text-decoration: none'";
        echo ">";   print $row->HoTen; echo "</a>";    echo "</td>";
        echo "<td style='padding-left: 15px'>"; print $row->SoDienThoai;   echo "</td>";
        echo "</tr>";
    }
    echo "<td  style='padding:5px' colspan='2' bgcolor='#FF5CAD' align='center'   > <strong> ";  echo "Tổng =  ";  echo $i;     echo "</strong></td>";
}
echo "<td  style='padding:5px' colspan='1' bgcolor='#FF5CAD' align='center'   > <strong> ";  echo "<input type='submit' name='submit' value='Xuất file excel'> ";  echo "</strong></td>";
echo "</table>";
echo form_close();
?>